
<%@page import="comits.web.client.servlets.demo.*"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="d"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1" import="java.sql.*" errorPage=""%>

<sql:setDataSource var="dataSource" driver="com.mysql.jdbc.Driver"
	url="jdbc:mysql://localhost:3306/comits_base" user="root"
	password="admin" scope="session" />
    
<html>
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Comits Web Client - CAlCULE DU STOCK SECU</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="mm_entertainment.css" type="text/css" />
</head>
<body>
	<form action="SsServlet" method="post">
		<table width="100%" border="0" cellspacing="0" cellpadding="0"
			align="center" border=1 style="height: 654px; ">
			<tr bgcolor="02021e">
				<td width="410" nowrap="nowrap"><img src="images/vin.jpg" width="400"
					height="140" border="0" style="width: 471px; "/></td>
				<td colspan="2" valign="center" nowrap="nowrap"
					id="logo">OENOLOGISTICS</td>
			</tr>
			
			<tr>
				<td colspan="3" valign="top" style="width: 901px; height: 435px"><br />
					<table border="0" cellspacing="0" cellpadding="2" width="80%"
						align="center" border=1 style="width: 789px; ">
						<tr>
							<td class="subHeader" align="center">CALCULE DU STOCK DE SECURITE </td>
						</tr>
						<tr>
							<td>&nbsp;</td>
						</tr>
						<tr>
							<td style="height: 479px; width: 809px">
							<sql:query var="queryresults1"		dataSource="${dataSource}">
              select NumBtq from comits_base.boutique
    </sql:query> <sql:query var="queryresults2" dataSource="${dataSource}">
              select Classe from comits_base.frontiere
    </sql:query>
			                       
								
								
								<table align="center" width="650" cellpadding="5" border=1
									style="height: 367px; width: 705px">
									<tr>
										<td style="width: 249px; ">BOUTIQUE:</td>
										<td><select name="boutique">
												<option value="boutique" />boutique
												</option>
												<c:forEach var="row" items="${queryresults1.rows}"
													varStatus="status">
													<option value="<c:out value="${row.NumBtq}" />">
														<c:out value="${row.NumBtq}" />
													</option>
												</c:forEach>


										</select>
										</td>
									</tr>
									<tr>
										<td>CLASSE:</td>
										<td><select name="classe">
												<option value="classe"></option>classe
												<option></option>
												<c:forEach var="row" items="${queryresults2.rows}">
													<!--varStatus="status"!-->
													<option value='<c:out value="${row.Classe}" />'>
														<c:out value="${row.Classe}"></c:out>
													</option>
												</c:forEach>




										</select></td>
									</tr>

									<tr>
										<td>NB MOIS:<br>
										<i>(Nombre de mois pris en compte dans le calcul)</i>
										</td>
										<td><select name="nbMois">
												<option value="nbMois"></option>nbMois
												<option value="2">02</option>
												<option value="3">03</option>
												<option value="4">04</option>
												<option value="5">05</option>
												<option value="6">06</option>
												<option value="7">07</option>
												<option value="8">08</option>
												<option value="9">09</option>
												<option value="10">10</option>
												<option value="11">11</option>
												<option value="12">12</option>
										</select>
										</td>
									</tr>
									<tr>
										<td align="right"><input type="submit"name="action" class="button" value="Calculer" />
										</td>
										<td><input name="resultat" type="text" size="30"
											style="width: 122px;" align="middle"> Bouteilles</td>
									</tr>
								</table></td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<br />
	</form>
</body>
</html>